home *** CD-ROM | disk | FTP | other *** search
- on typeText
- set str to the text of field "textCode"
- set nbWords to the number of words in str
- repeat with x = 1 to nbWords
- set curWord to word x of str
- if char 1 of curWord = "$" then
- delete char 1 of curWord
- set val to value(curWord)
- set count to the timer
- repeat while the timer < (count + val)
- end repeat
- next repeat
- end if
- if char 1 of curWord = "#" then
- delete char 1 of curWord
- puppetSound(curWord & ".AIF")
- updateStage()
- repeat while soundBusy(1)
- end repeat
- next repeat
- end if
- repeat with y = 1 to the number of chars in curWord
- set curChar to char y of curWord
- put curChar after field "diaryText"
- updateStage()
- if ".," contains curChar then
- puppetSound("Key1")
- else
- puppetSound("key1")
- end if
- go(the frame + 1)
- updateStage()
- end repeat
- put " " after field "diaryText"
- end repeat
- set freeze to the timer
- repeat while the timer < (freeze + 60)
- end repeat
- end
-